<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>

  <script>
    // 一个最简单的实现
    function createScript(src) {
      let script = document.createElement('script');
      script.type = 'text/javascript';
      script.src = src;
      document.body.appendChild(script);
    }

    function callbackFunc(data) {
      console.log(data)
    }

    let url = 'http://localhost:5555/users?callback=callbackFunc';
    // let url = 'http://localhost:5555/users?id=1&callback=callbackFunc';

    createScript(url)
  </script>
</body>

</html>